<template>
  <div>
    <CategorySelector :disabled="isShow !== 1" />
    <el-card class="container">
      <SpuList v-if="isShow === 1" @updateIsShow="updateIsShow" />
      <UpdateOrLook v-if="isShow === 2" @updateIsShow="updateIsShow" />
      <AddSku v-if="isShow === 3" @updateIsShow="updateIsShow" />
    </el-card>
  </div>
</template>

<script>
import SpuList from "./SpuList";
import UpdateOrLook from "./UpdateOrLook";
import AddSku from "./AddSku";
export default {
  name: "Spu",
  data() {
    return {
      // 1:SpuList展示 2：UpdateOrLook展示 3：AddSpu展示
      isShow: 1,
    };
  },
  components: {
    SpuList,
    UpdateOrLook,
    AddSku,
  },
  methods: {
    updateIsShow(val) {
      this.isShow = val;
    },
  },
};
</script>

<style>
</style>